package com.xs.designpattern;

/**
 * 军士
 * @author xs
 */
public class Sergeant extends Unit{
    public Sergeant(Unit... children) {
        super(children);
    }

    /**
     * 接受参观
     * @param visitor 访客
     */
    @Override
    public void accept(UnitVisitor visitor) {
        visitor.visit(this);
        super.accept(visitor);
    }

    @Override
    public String toString() {
        return "军士";
    }
}
